package org.dromara.iot.enums;

import lombok.Getter;

@Getter
public enum ForbiddenItemAlarmEnum {
    ELECTRIC_BIKE("ELECTRIC_BIKE", "电动车禁止入内"),
    PET_DOG("PET_DOG", "宠物狗禁止入内"),
    GAS_CYLINDER("GAS_CYLINDER", "煤气瓶禁止入内");

    private final String code;
    private final String desc;

    ForbiddenItemAlarmEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static ForbiddenItemAlarmEnum getForbiddenItemAlarmEnum(String code) {
        for (ForbiddenItemAlarmEnum forbiddenItemAlarmEnum : ForbiddenItemAlarmEnum.values()) {
            if (forbiddenItemAlarmEnum.getCode().equals(code)) {
                return forbiddenItemAlarmEnum;
            }
        }
        return null;
    }
}
